<%--
  Created by IntelliJ IDEA.
  User: wsx
  Date: 2017/5/10
  Time: 14:44
  To change this template use File | Settings | File Templates.
--%>
<%@ include file="/WEB-INF/views/include/header.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<input type="text" value="${pageIndex}" hidden id="pageIndex">
<input type="text" value="${pageCount}" hidden id="pageCount">
<input type="text" value='${jsonObject}' hidden id="jsonObject">
<br>
<form class="layui-form" action="/admin/querygoods?queryflag=1" method="post">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">商品名称</label>
            <div class="layui-input-inline" >
                <input type="text" name="querygoodsname" autocomplete="off" class="layui-input"
                       value="${recCroPurgoodsVo.goodname}">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">商品价格</label>
            <div class="layui-input-inline">
                <input type="text" value="${recCroPurgoodsVo.price_min}" name="price_min" placeholder="￥"
                       autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid">-</div>
            <div class="layui-input-inline" >
                <input type="text" name="price_max" value="${recCroPurgoodsVo.price_max}" placeholder="￥"
                       autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">商品类型</label>
            <div class="layui-input-block">
                <select name="querytype" lay-verify="required">
                    <option value="11">选择商品类型</option>
                    <c:forEach items="${SysDict['goods_type']}" var="type">
                        <%--<option value="${type.key}">${type.value}</option>--%>
                        <c:if test="${recCroPurgoodsVo.type==type.key}">
                            <option value="${type.key}" selected>${type.value}</option>
                        </c:if>
                        <c:if test="${recCroPurgoodsVo.type!=type.key}">
                            <option value="${type.key}">${type.value}</option>
                        </c:if>
                    </c:forEach>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">查询</button>
            </div>
        </div>
    </div>
</form>

<table class="layui-table" lay-even="" lay-skin="row">
    <colgroup>
        <col width="5%">
        <col width="20%">
        <col width="5%">
        <col width="18%">
        <col width="5%">
        <col width="5%">
        <col width="5%">
        <col width="10%">
        <col width="10%">
        <col width="12%">
    </colgroup>
    <thead>
    <tr>
        <th>序号</th>
        <th>商品名称</th>
        <th>商品类型</th>
        <th>商品规格</th>
        <th>图片</th>
        <th>商品价格</th>
        <th>商品数量</th>
        <th>上线时间</th>
        <th>最后修改时间</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:set var="i" value="${0}"/>
    <c:forEach items="${croPurgoodsVos}" var="croPurgoodsVo">
        <tr>
            <c:set var="i" value="${i+1}"/>
            <td>${i}</td>
            <td>${croPurgoodsVo.goodname}</td>
            <td>${SysDict['goods_type'][croPurgoodsVo.type]}</td>

            <td>${croPurgoodsVo.detail}</td>
            <td><img src="${croPurgoodsVo.imagurl}" width="32px" height="32px"></td>
            <td>${croPurgoodsVo.uniprice}</td>
            <td>${croPurgoodsVo.goodsnumber}</td>
            <td>${croPurgoodsVo.createtime}</td>
            <td>${croPurgoodsVo.overdate}</td>
            <td><a data-method="update" goodsid="${croPurgoodsVo.id}"
                   class="layui-btn layui-btn-small layui-btn-normal updategoods"><i class="layui-icon"></i></a>
                &nbsp;&nbsp;
                <a data-method="notice" goodsid="${croPurgoodsVo.id}"
                   class="layui-btn layui-btn-small layui-btn-danger delgoods"><i class="layui-icon"></i></a></td>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div id="fullpage"></div>
